package com.pai4j.zwiki.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * ZWiki任务类型枚举
 *
 * @author pai4j
 * @since 2025-10-14
 */
@Getter
@AllArgsConstructor
public enum ZWikiTaskType {

    PROJECT_ANALYSIS("project_analysis", "项目分析"),
    THESIS_GENERATION("thesis_generation", "论文生成"),
    THESIS_OPTIMIZATION("thesis_optimization", "论文优化");

    private final String code;
    private final String name;

    public static ZWikiTaskType fromCode(String code) {
        for (ZWikiTaskType type : values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }
}

